package
{
	import com.pickgliss.utils.StringUtils;
	
	import flash.geom.Point;
	import flash.geom.Rectangle;

	public class PlistFrameInfo
	{
		public var frameRect:Rectangle;
		public var name:String = "";
		public var sourceRect:Rectangle;
		
		private static const startReg:RegExp = /\{/g;
		private static const endReg:RegExp = /\}/g;
		public static function processRect(data:String):Rectangle
		{
			data = data.replace(startReg,"");
			data = data.replace(endReg,"");
			var para:Array = data.split(",");
			return new Rectangle(para[0],para[1],para[2],para[3]);
		}
		
		public function equals(info:PlistFrameInfo):Boolean
		{
			if(frameRect.equals(info.frameRect) && sourceRect.equals(info.sourceRect))return true;
			return false;
		}
	}
}